package com.shark.manager.system.service;

import com.shark.commons.base.service.IService;
import com.shark.commons.base.web.AjaxResult;
import com.shark.manager.system.entity.User;

public interface UserService extends IService<User> {
	
	public User findByAccount(String account) ;
	
	public User findByEmail(String account) ;
	
	public AjaxResult<Object> loginValid(String account, String password) ;
	
	public AjaxResult<Object> resetPassword(String password, Long[] ids) ;
	
	
	/**
	 * 1
	 * 找回密码，生成找回密码的数字签名链接地址，并发送到邮箱
	 * 数字签名（id+email+datetime+随机秘钥）
	 * @param email
	 * @return
	 */
	public AjaxResult<Object> iforgotPassword(String email);
	
	/**
	 * 2
	 * 检查找回密码的链接地址是否正确
	 * @param digitalSignature 数字签名
	 * @return
	 */
	public AjaxResult<Object> iforgotCheckLink(String digitalSignature);

	/**
	 * 3
	 * 密码找回的重设密码
	 * @param digitalSignature 数字签名
	 * @param newPassword 新密码
	 * @return
	 */
	public AjaxResult<Object> iforgotByResetPassword(Long id, String newPassword);

}
